import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        double a = in.nextDouble();
        char c = in.next().charAt(0);
        a = (int)Math.ceil(a);
        double ret = 20;
        if (a > 1.0) ret = ret + (a - 1) * 1;
        if (c == 'y') ret += 5;
        System.out.println((int)ret);
    }
}
